;; Setup modes to load
(setq load-path (cons "~/.emacs.files" load-path))
(load "myemacs")
(load "go-mode")
(load "php-mode")
(load "doxymacs")

(put 'narrow-to-region 'disabled nil)    ; enable...
(put 'erase-buffer 'disabled nil)        ; ... useful things
(when (fboundp file-name-shadow-mode)    ; emacs22+
  (file-name-shadow-mode t))             ; be smart about filenames in mbuf

;(setq transient-mark-mode t)
(global-set-key (kbd "<f8>") 'speedbar-get-focus)

(setq php-basic-indent 2)

;(setq tab-width 2)
(setq indent-tabs-mode nil)

(setq-default indent-tabs-mode nil)
(setq indent-tabs-mode . nil)

;; mouse scroll
;;(mouse-wheel-mode 1)

;;coloration syntaxique
(global-font-lock-mode t)

;(require 'paren)
;(show-paren-mode t)

; change tab size
(setq default-tab-width 8)
(setq c-default-style "cc-mode")

;;virage du menu qui sert a rien
(menu-bar-mode 0)

;;virage de la toolbar qui sert a rien
;;(tool-bar-mode 0)

;;affiche la colonne en cour
(column-number-mode 1)
(line-number-mode 1)

;;vire le bootsplash
(setq inhibit-startup-message t)
;;(gnus-inhibit-startup-message t)

(defun trailing-whitespace-toggle () "Highlight or not the trainling whitespaces"
  (interactive)
  (if show-trailing-whitespace
      (progn (set-variable 'show-trailing-whitespace nil)
	     (message "Trailing whitespaces off"))
    (progn (set-variable 'show-trailing-whitespace t)
	   (message "Trailing whitespaces on"))))
(global-set-key [f5] 'trailing-whitespace-toggle)



;; s'assurer que les fichiers comportent des newline finaux
;; nil n'ajoute pas de newline
;; non-nil pose la question
;; t rajoute les newlines automatiquement
(setq require-final-newline 1
mode-require-final-newline 1)



;;fuck yes or no
(fset 'yes-or-no-p 'y-or-n-p)
;;(normal-erase-is-backspace-mode t)
;;changement de buffer ac ctrl+tab
;(global-set-key "" 'other-window)

(setq-default show-trailing-whitespace t)

(when (require 'ido nil t)
(ido-mode t))

(iswitchb-mode 1)

(set-face-foreground 'font-lock-comment-face "Red")
